words =['da', 'xiong', '12121','hello', 'andy','想一想','zz']
counter = 0
for word in words:
    if len(word) > 2 and word[0] == word[-1]:
        counter += 1
print(counter)